The present invention relates generally to computer systems and methods, and more particularly, to a computer implemented memory manager for using an Extended Upper Memory Block (XUMB) for storing runtime code and data.
The development of modern operating systems require the use of more and more memory space below 1 MB. The BIOS is an expanding entity, due to the recent addition of ACPI, USB, 1394, and USB 2.0 components, for example. BIOS cannot use UMB (Upper Memory Block) space, which is memory just below 1 MB, because if BIOS does this, there will not be any space for optional read-only-memory (OPROM) to load. Also, BIOS cannot take memory from the conventional memory space because some applications and certain operating systems (such as Japanese DOS, for example) fail to boot if there is less conventional memory in the system. The present invention has been developed to solve these problems.
In addition, some chipsets have limited shadow capabilities, and it is impossible to allocate just 16 KB for USB because shadow granularity is 64 KB. This leaves very little room for option ROMs, for example. Finally, other chipsets have problems with Direct Memory Access (DMA) into the C0000-FFFFF region, so this memory area cannot be used for USB, for example.
It is therefore an objective of the present invention to provide for a memory manager, method and computer system that allows use of XUMB memory space by system BIOS to store runtime code and data.
To accomplish the above and other objectives, the present invention provides for a memory manager (implemented as software code), a method and a computer system that allows use of an Extended Upper Memory Block (XUMB), referred to as XUMB memory space, to store runtime code and data. A reduced-to-practice embodiment of the memory manager is implemented in Phoenix BIOS developed by the assignee of the present invention, but may be implemented in any BIOS or operating system (OS).
The XUMB memory space is above 1 MB. The XUMB memory space in an Advanced Configuration and Power Interface (ACPI) system, for example, consists of an ACPI NVS area and an ACPI Reclaim area. The ACPI NVS area generally has ACPI NVS tables (such as a Fixed ACPI Control Structure (FACS) and a Secondary System Description Table (SSDT), for example) and memory area reserved by USB (Universal Serial Bus), IEEE-1394, and Boot Integrity Services (BIS) components, for example.
A reduced-to-practice embodiment of the Phoenix BIOS that implements the present memory manager marks the XUMB memory space as reserved so that the operating system and any other driver does not destroy it. Embodiments of the Phoenix BIOS implementing the present memory manager allow USB Frame lists and other data segments, for example, to be stored in the XUMB memory area.
The XUMB memory space is an extended memory area reserved by the basic input/output system (BIOS) of a computer system. This area is near the top of memory (TOM) of the system. BIOS Power-On-Self-Test (POST) code finds the top or memory (TOM) and then finds any reserved memory near the TOM and any memory holes in the chipset. After this, the BIOS reserves maximum XUMB memory. Maximum XUMB memory in Phoenix BIOS, developed by the assignee of the present invention, can go up to 1 MB, but the actual size of the XUMB memory space depends on the BIOS components that are installed in the computer system.
An exemplary memory manager is implemented as follows. BIOS Power-On-Self-Test (POST) code sets up or allocates the XUMB memory space. The XUMB memory space is set up at TP_SETUP_WAD (0D3h). The BIOS code finds space in extended (main) memory space. The BIOS code then zeroes out the XUMB memory space and stores the address of the XUMB memory space in a variable.
When different components of the BIOS code need to reserve memory in the XUMB memory space, they call a predetermined calling function (referred to as xe2x80x9ccoreE820AllocateWADxe2x80x9d). This calling function reserves memory for each of the different BIOS components in the XUMB memory space and allocates pointers to the specific address that may be used by these components. The BIOS components then copy their own data in these memory locations of the XUMB memory space.